using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class WF_StepMap : EntityTypeConfiguration<WF_Step>
    {
        public WF_StepMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Subject)
                .HasMaxLength(100);

            this.Property(t => t.Action)
                .HasMaxLength(20);

            this.Property(t => t.Request)
                .HasMaxLength(20);

            this.Property(t => t.ReplyAction)
                .HasMaxLength(20);

            this.Property(t => t.Response)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("WF_Step");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Subject).HasColumnName("Subject");
            this.Property(t => t.Order).HasColumnName("Order");
            this.Property(t => t.Duration).HasColumnName("Duration");
            this.Property(t => t.WorkflowType).HasColumnName("WorkflowType");
            this.Property(t => t.Role).HasColumnName("Role");
            this.Property(t => t.Action).HasColumnName("Action");
            this.Property(t => t.Request).HasColumnName("Request");
            this.Property(t => t.ReplyAction).HasColumnName("ReplyAction");
            this.Property(t => t.Response).HasColumnName("Response");
        }
    }
}
